package com.example.demo.common.com.example.demo;

import java.util.ArrayList;
import java.util.Iterator;

public class fx_utils<T> {


    public static <T> void print(ArrayList<T> list) {
        Iterator<T> iterator = list.iterator();
        while(iterator.hasNext()){
            T t = iterator.next();
            System.out.println(t);
        }
    }

    //占位符，也称为通配符。表示元素类型可以匹配任意类型
    public static void print2(ArrayList<?> a){
        for(Iterator<?> it = a.iterator();it.hasNext();){
            System.out.println(it.next());
        }
    }


    /*public static <T> fx_utils<T> ss () {

    }*/


}
